{include file="common/_meta" /}
<title>公告列表</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 公告管理 <span class="c-gray en">&gt;</span> 公告列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
	<div class="text-c">
			</div>
	<div class="cl pd-5 bg-1 bk-gray mt-20"> 
	<!-- <a class="btn btn-primary radius" onclick="product_edit('添加产品','add')" href="javascript:;"><i class="Hui-iconfont"></i> 添加产品</a>  -->
	<span class="r">共有数据：<strong>{$list->total()}</strong> 条</span> </div>
	<div class="mt-20">
		<table class="table table-border table-hover  table-bg table-sort">
			<thead>
				<tr class="text-c">
					<th width="25"><input type="checkbox" name="" value=""></th>
					<th>编号</th>
					<th>公告标题</th>
					<th>类别</th>
					<!-- <th>公告内容</th> -->
					<th>发布时间</th>
					<!-- <th>状态</th> -->
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				{volist name="list" id="vo"}
					<tr class="text-c">
						<td><input name="" type="checkbox" value=""></td>
						<td width="40px">{$i}</td>
						<td>{$vo.n_title}</td>
						<td>{switch name="$vo.n_keywords"}
							{case value="0"}官方公告{/case}
							{case value="1"}行业动态{/case}
							{case value="2"}新闻资讯{/case}
							{/switch}
						</td>
						<!-- <td>{$vo.n_message|mb_substr=###,0,80}...</td> -->
						<td>{$vo.create_time}</td>

						<td class="f-14 td-manage">
							<a style="text-decoration:none" onclick="delNotice(this,{$vo.id},-1)" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe631;</i></a>
							&nbsp;&nbsp;&nbsp;
							<a style="text-decoration:none" href="{:url('Notice/issueNotice')}?id={$vo.id}"  title="编辑"><i class="Hui-iconfont">&#xe6df;</i></a> 
							&nbsp;&nbsp;&nbsp;
						</td>
					</tr>
				{/volist}
			</tbody>
		</table>
		<div class="pages" style="margin:20px;float: right; ">{$list->render()}</div>
	</div>
</div>

{include file="common/_footer" /}
<script type="text/javascript">
	var flag = 1;
	function delNotice(obj,id,status){
		if (flag) {
			flag = 0;
			$.post("{:url('Notice/index')}?act=down",{id:id,status:status}).success(function(data){
				layer.msg(data.msg);
				if(data.code){
					setTimeout(function(){
						history.go(0);
					},500);
					
				} else {
					flag = 1;
				}
			});
		} else {
			layer.msg('请勿重复操作！');
		}
	}

</script>
</body>
</html>